Digitizing bar code symbol data

ABSTRACT

Processing an analog electrical signal containing information representative of reflected light from indicia including regions of different light reflectivity, wherein the analog electrical signal contains edge transitions corresponding to boundaries between adjoining regions of different light reflectivity of the indicia. The edge transitions of at least a part of the analog electrical signal are analyzed to determine a level of blur in that part of the electrical signal. Based on the determined level of blur, one of a plurality of different techniques is selected for processing that part of the electrical signal to produce a digitized electrical signal in which transitions in the digital level of the signal correspond to boundaries between adjoining regions of different light reflectivity of the indicia.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a continuation application of and claimspriority to U.S. Application Ser. No. 09/096,164, filed on Jun. 12,1998.

BACKGROUND OF THE INVENTION

[0002] The invention relates to digitizing bar code symbol data.

[0003] Bar codes symbols are graphical objects that encode informationas alternating dark and light portions, i.e., alternating regions ofdifferent light reflectivity, having specific relative widths. Bar codescanners have a wide range of applications, including reading bar codesymbols provided on products. From analog electrical signals containinginformation representative of reflected light from the bar code symbols,the scanners produce digitized electrical signals that are typically fedto computing apparatus for decoding and providing an identification ofthe product to which the bar code symbol is applied. Examples of barcode symbols and scanners are found in almost every supermarket,convenience store, and department store, as well as in warehouses andfactories that use bar code symbols and scanners for inventory andproduction control.

[0004] Bar code scanners include laser scanning bar code readers, whichscan the spot of a laser beam across a bar code, and bar code imagingsystems, which image the entire bar code onto a sensor (e.g., a CCD).

[0005] To decode the information, the bar code scanner must determinethe relative widths of the dark and light portions to an effectivedegree of accuracy. Typically, if the scanner acquires a representationof the bar code symbol in which the symbol is blurred (e.g., due tooptical or electrical filtering or being out-of-focus), decoding theinformation is difficult because the transitions between the dark andlight portions (i.e., boundaries between the adjoining regions ofdifferent light reflectivity) become indistinct, which complicates thedetermination of the relative widths.

SUMMARY OF THE INVENTION

[0006] The invention provides a method and a system for use indigitizing blurred signals representative of bar code symbols by takinginto account characteristics specific to bar code symbols, therebyimproving the working range and effective resolving power of a bar codescanner by allowing the scanner to decode symbol images acquired atdistances or under conditions that cause blurring of the analog signalrepresenting the scanned symbol. Such blurring could result fromout-of-focus optics, undersampling, poorly printed symbols, low passfiltering of the analog signal, or other causes. The invention alsoimproves decoding accuracy in the presence of low and high frequencynoise.

[0007] In a first aspect, the invention features processing an analogelectrical signal containing information representative of reflectedlight from indicia including regions of different light reflectivity,wherein the analog electrical signal contains edge transitionscorresponding to boundaries between adjoining regions of different lightreflectivity of the indicia. Edge transitions of at least a part of theanalog electrical signal are analyzed to determine a level of blur inthat part of the electrical signal. Based on the determined level ofblur, one of a plurality of different techniques is selected forproducing the digitized signal (in which transitions in the digitallevel of the signal correspond to boundaries between adjoining regionsof different light reflectivity of the indicia).

[0008] One or more of the following features may be incorporated inpreferred implementations of the invention: The step of analyzing theedge transitions may be performed on a plurality of different parts ofthe analog electrical signal, and different digitizing techniques may beused on the different parts of the analog signal depending on the levelof blur in the different parts of the analog signal. The edgetransitions may be ranked by magnitude, and ranked edge transitions maybe analyzed to detect the extent of blur represented in the part of theelectrical signal. The ranking may be done by forming a histogram of themagnitudes of the edge transitions. A decision that significant blurringexists may be based on the analog electrical signal having edgetransitions of substantially different magnitudes. Edge transitionshaving less than a threshold magnitude may be rejected. The edgetransitions may be grouped into sets by magnitude, and whether thedifference between a first magnitude associated with a first set and asecond magnitude associated with a second set is substantially equal tothe difference between the first magnitude and a third magnitudeassociated with a third set may be tested.

[0009] In a second aspect, the invention features determining whether anedge transition corresponds to a boundary between adjoining regions ofsubstantially equal width; and based on the determination, producing thedigitized electrical signal.

[0010] One or more of the following features may be incorporated inpreferred implementations of the invention: Whether at least a part ofthe electrical signal is inconsistent with an alternating dark-and-lightfeature of a bar code symbol may be determined. If an inconsistency isfound, at least that part of the analog electrical signal may berejected. Whether a part of the analog electrical signal crosses amagnitude threshold more than once may be determined. If a part is foundto cross the magnitude threshold more than once, at least that part ofthe analog electrical signal may be rejected. The extent to which anedge transition that corresponds to a boundary between two adjoiningregions of different widths is affected by one of the regions may bedetermined.

[0011] In a third aspect, the invention features determining that theanalog electrical signal contains edge transitions corresponding to lessthan all of the boundaries between the adjoining regions of differentlight reflectivity of the indicia; for at least part of the analogelectrical signal, determining the number of boundaries that lackcorresponding edges; and based on the determination about the number ofboundaries that lack corresponding edges, producing the digitizedelectrical signal.

[0012] One or more of the following features may be incorporated inpreferred implementations of the invention: Information about therelative positioning of the boundaries that lack corresponding edgetransitions may be determined. Information about the relativepositioning of at least three boundaries that lack corresponding edgetransitions may be determined. Information about the relativepositioning of boundaries that lack corresponding edge transitions,between regions of dissimilar light reflectivity of the indicia may bedetermined. The relative positioning may be determined with respect tointermediate points in the regions. Information about the relativepositioning of boundaries that lack corresponding edge transitions,between regions of similar light reflectivity of the indicia may bedetermined. Relative positioning may be determined with respect tointermediate points in the regions.

[0013] In a fourth aspect, the invention features determining therelative heights of edge transitions in the analog electrical signal;and depending on the relative heights, selecting one of a plurality ofdifferent techniques for processing the electrical signal to produce thedigitized electrical signal.

[0014] In a fifth aspect, the invention features analyzing the edgetransitions to classify at least a part of the analog electrical signalinto one of three categories corresponding to slight, moderate, orsevere levels of blur in that part of the analog electrical signal; ifthe part of the analog electrical signal is classified into the categorycorresponding a slight level of blur or into the category correspondingto a moderate level of blur, based on half-height points in edgetransitions in the analog electrical signal, determining informationabout the relative positions of boundaries between adjoining regions ofdifferent light reflectivity of the indicia; if the part of the analogelectrical signal is classified into the category corresponding a severelevel of blur, based on a determination about the number of regionsdisposed between regions about which relative positioning information isknown, determining information about the relative positions ofboundaries between adjoining regions of different light reflectivity ofthe indicia; and based on the information determined about the relativepositions, producing the digitized electrical signal.

[0015] In a sixth aspect, the invention features processing theelectrical signal to determine a set of possible edge transition pointsin said signal; classifying at least some of the edge transition pointsagainst a predetermined amplitude and frequency threshold into at leasttwo categories corresponding to the frequency spectrum or blur of thesignal associated with each edge transition point; and separatelyprocessing each set of edge transition points in each category as aresult of the classifying step, and combining the result to produce thedigitized electrical signal.

[0016] In a seventh aspect, the invention features detecting edgetransitions in the analog scan signal; determining the level of blur inthe vicinity of each of a plurality of edge transitions; digitizing theedge transitions differently based on the determined level of blur inthe vicinity of the edge transition; combining the results of thedigitizing step to produce a digitized electrical signal from the analogscan signal.

[0017] Other advantages and features will become apparent from thefollowing description and from the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0018]FIG. 1 is a block diagram of a bar code handling system includingan image analysis system.

[0019]FIG. 2 is an illustration of a bar code symbol.

[0020] FIGS. 3A-3E and 17 are illustrations of the effects of defocusingon a bar code symbol.

[0021] FIGS. 4-5, 9-14 are flow diagrams of procedures for analyzing abar code symbol.

[0022]FIGS. 6, 8, and 18-19 are illustrations of waveforms derived froma bar code symbol.

[0023] FIGS. 7A-7C, 15 are diagrams of histograms derived from a barcode symbol.

[0024]FIGS. 16 and 20 are diagrams of linear relationships derived froma bar code symbol.

[0025]FIG. 21 is a block diagram of an example of an implementation ofthe image analysis system of FIG. 1.

[0026]FIG. 22 is a block diagram of a laser scanning bar code readersupplying a brightness curve to the image analysis system.

[0027]FIG. 23 is a drawing of a laser scanning bar code reader.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028]FIG. 1 illustrates an image analysis system 10 that processes abar code image 12 representing a bar code symbol (e.g., symbol 14), todetermine a set 16 of positions of transitions between portions (e.g.,portions 18 aa-18 cg in FIG. 2) of the bar code symbol. The bar codeimage is provided by an image acquisition system 20 that may include alens apparatus 22 and a CCD imager 24, and a bar code interpretationsystem 26 may derive data 28 (e.g., a serial number) from the set ofpositions. The image analysis system is able to determine the set ofpositions even if the bar code image, or signal representing the image,is blurred, by relying on characteristics of blurred bar code images, asdescribed below.

[0029] In a specific embodiment described herein, the positions that aredetermined are relative in that the positions indicate relationshipsamong the transitions and are not used to determine absolute distancesbetween transitions or absolute widths of portions of the bar codesymbol. The determination of the relative positions allows ratios ofabsolute distances or ratios of absolute widths to be calculated, whichratios are sufficient for decoding the bar code symbol. For example, thebar code symbol can be decoded without having to determine the absolutesize of the bar code symbol or the absolute distance between the CCDimager and the bar code symbol and without having to refer to a scalingkey in or near the symbol. Thus, as used herein, indications of spatialcharacteristics within the bar code symbol (e.g., position, width,distance, and size) refer to relative spatial characteristics (e.g.,relative position, relative width, relative distance, and relative size,respectively).

[0030] A signal representing a bar code can become blurred in differentways. For example, the blurring can result from the bar code symbolbeing out-of-focus, or from undersampling which occurs when the bar codesymbol is represented in the bar code image by too few pixels to allowconventional decoding. (FIG. 18 illustrates the brightness of a bar codesymbol of a bar code image in which undersampling causes sometransitions between portions to fail to register fully or at all.) Asymbol that is tilted with respect to the image acquisition system, orthat is obscured by an intervening factor (e.g., fog inside a freezer)may also lead to a blurred bar code signal. Blurring can also be causedby electronic processing such as filtering involving a limited bandwidthchannel or a low pass filter. In general, a signal is blurred if thesubject represented by the signal (e.g., a bar code symbol) includesdistinct transitions between elements (e.g., edges between dark andlight portions) and at least some of the transitions (e.g., transitionsthat do not meet an amplitude threshold or a frequency threshold) arenot accurately represented (e.g., are reduced in amplitude or are skewedor both).

[0031]FIG. 17 illustrates some effects of some kinds of blurring, whicheffects are described in more detail below. Solid and dashed lines 160and 162 show the brightness of a bar code symbol according to anin-focus image and an out-of-focus image, respectively. Transitions 164a and 164 c are between similarly-sized portions and therefore deformsubstantially symmetrically, allowing their positions to be determinedby reference to dashed line mid-height points 166 a and 166 c,respectively. In contrast, since transition 164 b is betweendissimilarly-sized portions and therefore deforms asymmetrically, dashedline mid-height point 166 b is a significantly less accurate indicatorof its position.

[0032] The characteristics of some blurred signals are illustrated byFIGS. 3A-3E that correspond to progressively more blurred signals. Inwaveform (“curve”) 15 a of FIG. 3A, which illustrates the brightness ofsymbol 14 along line A-A for a minimally blurred image (i.e., for asubstantially clear image), transitions between dark and light portions(e.g., between portions 18 ac and 18 ad, and portions 18 ad and 18 ae)are represented by substantially vertical lines (e.g., lines 30 and 32,respectively), each of which has a height h1 signifying a change betweenminimal brightness and maximal brightness. Deriving data accurately fromthe minimally blurred image is substantially straightforward, becausethe positions of the transitions can be determined accurately regardlessof the brightness threshold (e.g., threshold 34 or threshold 36) appliedto distinguish light portions (e.g., portion 18 ad) from dark portions(e.g., portion 18 ae).

[0033]FIG. 3B shows the brightness of symbol 14 along line A-A for aslightly blurred signal. In waveform 15 b of FIG. 3B, transitionsbetween dark and light portions (e.g., between portions 18 ac and 18 ad,and portions 18 ad and 18 ae) are represented by slightly non-verticallines (e.g., lines 38 and 40, respectively), each of which has a heightsubstantially equal to height hl. Without the processing describedbelow, deriving data accurately from the slightly blurred image would bedifficult, because the brightness threshold applied (e.g., threshold 34or threshold 36) has a significant effect on the determination of thepositions of the transitions. For example, depending on whetherthreshold 34 or threshold 36 is applied, the position of the transitionrepresented by line 41 may be determined to be position 42 or position44, respectively. In particular, a brightness threshold that leads to anaccurate derivation of data from the minimally blurred image may lead toan inaccurate derivation of data from the slightly blurred image.

[0034]FIG. 3C illustrates the brightness of symbol 14 along line A-A fora moderately blurred signal. In waveform 15 c of FIG. 3C, thetransitions between dark and light portions (e.g., between portions 18ac and 18 ad, and portions 18 ad and 18 ae) are represented by lines(e.g., lines 46 and 48, respectively) that are even less vertical thancorresponding lines of FIG. 3B. In addition, some of the lines haveheights that are significantly less than height h1. For example, lines50 and 52 have heights h2 and h3, respectively, which heights signifychanges in brightness between minimal (or maximal) brightness and a graylevel, and between two gray levels, respectively. As explained below,the heights h1, h2, and h3 conform to the equation h1-h2=h2-h3. Withoutthe processing described below, deriving data accurately from themoderately blurred image would be very difficult, because sometransitions may be missed entirely, depending on the brightnessthreshold applied (e.g., the transition represented by line 52 is missedentirely if threshold 34 or threshold 36 is applied).

[0035]FIG. 3D shows the brightness of symbol 14 along line A-A for aseverely blurred signal. In waveform 15 d of FIG. 3D, transitionsbetween some dark and light portions are represented by lines of heighth4 (e.g., line 54) or height h5 (e.g., line 56). In the severely blurredimage, transitions between other, narrower, portions (e.g., portions 18ab and 18 ac) are so blurred that such transitions are not representedin FIG. 3D by lines of any significant height.

[0036] As shown in FIG. 4, to determine the set of positions, the imageanalysis system first executes a procedure 60 (FIG. 5) to determinewhether the image is slightly, moderately, or severely blurred (step1010), and then executes a procedure 62 (FIG. 9), a procedure 64 (FIG.12), or a procedure 118 (FIG. 14), respectively, to determine the set ofpositions (step 1020).

[0037]FIG. 5 illustrates procedure 60 for determining whether the signalis slightly, moderately, or severely blurred. Procedure 60 relies onsome of the characteristics described above, i.e., that slightly blurredsignals produce essentially one magnitude of transitions (represented byheight h1 noted above), that moderately blurred signals produceessentially three magnitudes of transitions (represented by heights h1,h2, and h3 noted above), and that severely blurred signals produceessentially two magnitudes of transitions (represented by heights h4 andh5 noted above).

[0038] According to procedure 60, the image analysis system receivesdata representing a brightness waveform (e.g., waveform 15 b of FIG. 3B)derived from a blurred signal (step 2010). In the waveform, the systemdetermines lines (also known as “edges”) (e.g., edges 70, 72 in FIG. 3B)by finding portions between local minimums and local maximums (e.g,local minimum 74 and local maximum 76 for edge 70) (step 2020). Theheight of each edge is a relative height equal to the difference betweenthe vertical positions of the local maximum and minimum. The use of therelative height allows the system to significantly avoid the influenceof low-frequency noise, i.e., noise having a lower spatial frequencythan the spatial frequencies present in the bar code symbol. Forexample, FIG. 6 shows brightness waveform 78 having a second half 80that is buoyed on a crest of a period of a low-frequency noise signal82. The use of relative height instead of absolute height effectivelyfilters out the crest.

[0039] The system creates data representing an edge-height histogram(e.g., histogram 84 a, 84 b, or 84 c shown in FIG. 7A, 7B, or 7C,respectively) (step 2030). In the histogram, the x-axis indicates heightas a fraction of the maximum possible height (corresponding to themaximum possible brightness), and the y-axis indicates a number ofedges. For example, in histogram 84 c, point 86 indicates that 10 edgesof the brightness waveform have a height 0.65.

[0040] To filter out high-frequency noise that appears as relativelysmall edges in the brightness curve, a height threshold (e.g., set to alevel in the range of one-eighth to one-quarter the maximum possibleheight) may be applied to the histogram. If the height threshold is setto a high level, a histogram that would otherwise be processed as atri-modal histogram (described below) may be treated as a bi-modalhistogram (described below) instead, because at the high level theheight threshold may eliminate some edges that represent actualtransitions of the image, not noise.

[0041] The system determines whether the histogram is a tri-modalhistogram (step 2040). To do so, the system attempts to find spaces(i.e., x-axis positions that correspond to none of the edges) in thehistogram that divide the histogram data into three equal-sized sections(e.g., sections 88 a, 88 b, and 88 c in FIG. 7C), and, if successful,then tests whether the data in the sections substantially conforms tothe equation h1-h2=h2-h3 that is mentioned above and that is illustratedin FIG. 8. An edge of height h1 represents a transition between a wide(“saturated”) light portion and a saturated dark portion (e.g., betweenportions 18 br and 18 bs of FIG. 2). An edge of height h2 represents atransition between a saturated light portion and a narrow(“unsaturated”) dark portion (e.g., between portions 18 bj and 18 bk ofFIG. 2), or between a saturated dark portion and an unsaturated lightportion (e.g., between portions 18 aq and 18 ar of FIG. 2). An edge ofheight h3 represents a transition between an unsaturated light portionand an unsaturated dark portion (e.g., between portions 18 ba and 18 bbof FIG. 2).

[0042] Before testing whether the data in the sections substantiallyconforms to the equation h1-h2=h2-h3, the system may reduce the data ineach section to a respective weighted average, and test the weightedaverages instead. Histogram 84 c of FIG. 7C is an example of a histogramthat has data substantially conforming to the equation, and thattherefore is a tri-modal histogram.

[0043] If the system determines that the histogram is a tri-modalhistogram, the image is determined to be a moderately blurred image, andthe image's brightness curve is processed according to procedure 64(FIG. 12) described below (step 2050).

[0044] Otherwise, the system determines whether the histogram is abi-modal histogram (step 2060). To do so, the system attempts to find aspace in the histogram that divides the histogram data into twoequal-sized sections (e.g., sections 90 a and 90 b in FIG. 7B), and, ifsuccessful, determines whether the difference between weighted averagesof the data in the two sections is at least as great as the differencebetween the smaller of the weighted averages (i.e., the weighted averagefor the left section in the histogram) and the height thresholddescribed above. Such differences are present in histogram 84 b of FIG.7B, which is an example of a histogram that qualifies as a bi-modalhistogram.

[0045] If the system determines that the histogram is a bi-modalhistogram, the image is determined to be a severely blurred image, andthe image's brightness curve is processed according to procedure 118(FIG. 14) described below (step 2070).

[0046] Otherwise, the system determines whether the histogram is auni-modal histogram (step 2080), in which substantially all of the edgeshave the same height h1. Histogram 84 a of FIG. 7A is an example of ahistogram that qualifies as a uni-modal histogram.

[0047] If the system determines that the histogram is a uni-modalhistogram, the image is determined to be a slightly blurred image, andthe image's brightness curve is processed according to procedure 62(FIG. 9) described below (step 2090).

[0048] Otherwise, the system rejects the image (step 2100).

[0049] If the image is more than slightly blurred but less thanmoderately blurred, producing a histogram that is not uni-modal but alsonot fully tri-modal, either procedure 62 (FIG. 9) or procedure 64 (FIG.12) may be used to process the image's brightness curve. If the image ismore than moderately blurred but less than severely blurred, producing ahistogram in which one of three sections is near or below the heightthreshold, procedure 118 (FIG. 14) may be used to process the image'sbrightness curve.

[0050] In procedure 62 (FIG. 9) for processing slightly blurred images,the position of each transition (e.g., between portions 18bw and 18bx inFIG. 2) in the bar code symbol is determined to be the position (e.g.,position 92 in FIG. 3B) defined by a level (e.g., level 94) at which thecorresponding edge (e.g., edge 96) reaches half its relative height,i.e., a half-height level. The half-height level is used because in aslightly blurred image, the edge shape is assumed to be deformedsymmetrically. In particular, the system executes a calculate heightprocedure 98 (FIG. 10) described below to determine a calculated heightlevel (in this case, a half-height level) for each transition (step3010), and then executes a find position procedure 100 (FIG. 11)described below to determine a position for each transition (step 3020).

[0051] The system executes the calculate height procedure 98 (FIG. 10)as follows to produce calculated height levels. In view of the fact thatthe bar code symbol includes alternating light and dark portions, it isassumed that the portions of the bar code symbol conform to thefollowing 2 rules implementing a state machine: (1) any transition froma saturated or unsaturated light portion must be to a saturated orunsaturated dark portion, and (2) any transition from a saturated orunsaturated dark portion must be to a saturated or unsaturated lightportion. Before the first (i.e., leftmost) edge is encountered in thebrightness curve, the current portion is assumed to be a saturated lightportion (step 4010). It is determined whether the next edge height isgreater than the height threshold (step 4020). If not, step 4020 isrepeated for the next edge.

[0052] Otherwise, it is determined whether the edge height and directionare consistent with the state machine rules (step 4030). For example, ifthe current portion is a saturated or unsaturated dark portion, an edgedirection representing a decline in brightness would be inconsistentwith the state machine rules. If inconsistency is found, the image isrejected (step 4040).

[0053] Otherwise, the state machine position of the current portion isnoted (step 4050), and a calculated height level is produced by takingthe average of vertical positions of the local minimum and maximum thatdefine the edge, i.e., by selecting the half-height level of the edge(step 4060). Steps 4020-4060 are then repeated for all remaining edgesin the brightness waveform (step 4070).

[0054] The system executes the find position procedure 100 (FIG. 11) asfollows to produce positions for each edge. Steps 5010-5030 are executedfor each edge. The system determines whether the edge crosses thecalculated height level only once (step 5010). If not, the image isrejected (step 5020), because a repeated crossing signifies that theedge has a horizontal component (e.g., component 102 of FIG. 3D),indicating that the image is actually severely blurred (despite havingbeen determined by procedure 60 above to be only slightly blurred), sothat some transitions in the bar code symbol are not represented byedges in the brightness curve.

[0055] Otherwise, the system records in set 16 the position at which theedge crosses the calculated height level (step 5030), which position istaken to be the determined position of the transition represented by theedge.

[0056] In procedure 64 (FIG. 12) for processing moderately blurredimages, the position of each transition (e.g., between portions 18 bqand 18 br in FIG. 2) in the bar code symbol is determined to be theposition (e.g., position 104 in FIG. 3C) defined by an adjustedcalculated height level. As explained below, the half-height leveldiscussed above is not used for edges having height h2 corresponding tothe middle section of the histogram (e.g., section 88 b of FIG. 7C)(“medium height edges”) because such medium height edges representtransitions between saturated and unsaturated portions (e.g., portions18 bs and 18 bt in FIG. 2), which transitions do not deformsymmetrically. In particular, the system executes the calculate heightprocedure 98 (FIG. 10) described above to determine a calculated heightlevel (i.e., a half-height level) for each transition (step 6010),executes a calculated height adjustment procedure 106 (FIG. 13) toproduce adjusted calculated height levels from the calculated heightlevels (step 6020), and then executes the find position procedure 100(FIG. 11) described above to determine a position for each transition(step 6030). Thus, the intermediate adjustment step (step 6020) is onlydifference between procedure 62 and procedure 64, except that procedure64 calls for the find position procedure 100 (FIG. 11) to use theadjusted calculated height levels.

[0057] The system executes the calculated height adjustment procedure106 (FIG. 13) as follows to produce the adjusted calculated heightlevels from the calculated height levels, i.e., to apply adjustments tothe half-height levels for edges having medium heights. Steps 7010-7060are executed for each edge. The system determines whether the edge has amedium height (step 7010). If not, the system sets the adjustedcalculated height level equal to the calculated height level (step7020), and goes on to the next edge. The adjusted calculated heightlevels for the edges having non-medium heights are simply thehalf-height levels determined as discussed above in the description ofthe calculate height procedure 98 (FIG. 10). For such edges (called“anchor edges” for purposes described below), no adjustment isnecessary, because such edges represent symmetrical transitions, i.e.,transitions between saturated light and saturated dark portions (e.g.,portions 18 br and 18 bs in FIG. 2), or between unsaturated dark andunsaturated light portions (e.g., portions 18 ba and 18 bb in FIG. 2).Such symmetrical transitions deform symmetrically, allowing the use ofthe half-height levels.

[0058] If the edge has a medium height, the system determines the twonearest anchor edges (e.g., in FIG. 3C, anchor edges 108 and 110 formedium-height edge 112) (step 7030). Using the half-height levelspreviously determined for the two nearest anchor edges, the systemdetermines an anchor height level for the medium-height edge (step7040). The anchor height level is determined by interpolation if themedium-height edge is between the two anchor edges, or by extrapolationif not. For example, for anchor edges 108 and 110 and medium-height edge112 in FIG. 3C, anchor height level 116 is determined where dashed line114 intersects medium-height edge 112.

[0059] The system also calculates a relative modulation value for themedium-height edge (step 7050). The medium-height edge represents anasymmetrical transition, i.e., a transition between an unsaturatedportion and a saturated portion (e.g., in FIG. 2, between portions 18 apand 18 aq or between portions 18 bu and 18 bv). The relative modulationvalue is calculated by dividing the relative height of the medium-heightedge by double the relative height of an edge representing a transitionbetween saturated portions, i.e., by calculating h2/(2*h1) , and isindicative of the extent to which the saturated portion dominates theunsaturated portion in the transition represented by the medium-heightedge.

[0060] An adjusted calculated height level is calculated for themedium-height edge (step 7060), by taking a weighted average of themedium-height edge's half-height level and the anchor height level. Theweighted average is taken by multiplying the anchor height level by therelative modulation value to produce a weighted anchor height level,multiplying the half-height level by the difference of 2 less therelative modulation value to produce a weighted half-height level,summing the weighted anchor height level and the weighted half-heightlevel, and dividing the sum by 2.

[0061] The adjusted calculated height level is then ready for use by thefind position procedure 100 (FIG. 11) as described above.

[0062] In procedure 118 (FIG. 14) for processing severely blurredimages, the position of each transition is determined in a way that issignificantly different from the procedures described above forprocessing slightly or moderately blurred images. Since in this caseonly saturated portions (e.g., portions 18 aq and 18 av in FIG. 2) ofthe bar code symbol are reliably represented in the brightness curve,the positions of the transitions involving the other, narrower, portionsare estimated by determining the number of such other portions presentin between the saturated portions. Specifically, it is assumed that eachnarrow portion has substantially the same width, so that a matched pairof narrow portions, i.e., one dark narrow portion plus one light narrowportion, has a width equal to twice the width of a single narrow portion(a “doublewidth”). Procedure 118 relies on the fact that due to thedark-and-light alternating nature of bar code symbols, each saturatedportion (e.g., dark saturated portion 18 aq in FIG. 2) is separated fromits nearest neighboring saturated portion (e.g., white saturated portion18 av or dark saturated portion 18 ao) by a number of narrow portionsthat is odd or even, depending on whether the nearest neighboringsaturated portion is similar or dissimilar, respectively. As describedbelow, procedure 118 exploits this odd/even difference to estimate thedoublewidth, which allows the procedure 118 to determine the positionsof the transitions involving the narrow portions.

[0063] The system executes procedure 118 (FIG. 14) as follows. Thesystem creates an even histogram that includes the distances betweendissimilar saturated portions (step 8010), and an odd histogram thatincludes the distances between similar saturated portions (step 8020).For example, from data for curve 15 d shown in FIG. 3D, the systemproduces histogram 120 of FIG. 15, in which solid and dashed lines(e.g., solid line 122 and dashed line 124) represent data for the evenand odd histograms, respectively. In FIG. 3D, an example of a distancebetween similar saturated portions is distance 126 between edges 128 and130 that correspond to light saturated portions 18 az and 18 bj,respectively, in FIG. 2. An example of a distance between dissimilarsaturated portions is distance 132 between lines 134 and 136 thatcorrespond to light portion 18 av and dark portion 18 aq, respectively,in FIG. 2.

[0064] In at least some cases, it may be advantageous to determine thedistance between dissimilar saturated portions by measuring between 25%and 75% points (e.g., between points 138 and 140) of the associated edgeor edges. The use of such points may make the distance measurements lesssusceptible to errors caused by a substantially flat gray level area(e.g., area 142) at a 50% point or high-frequency noise at peak andvalley areas (e.g., areas 146 and 144).

[0065] Similarly, in at least some cases, it may be advantageous todetermine the distance between similar saturated portions by measuringbetween respective 50% points (e.g., points 148 and 150).

[0066] As shown in FIG. 15, in the even and odd histograms, thehorizontal axis indicates distance (which may be scaled by a factor) andthe vertical axis indicates the number of instances found of eachdistance.

[0067] The system organizes the odd and even histogram data points intoclusters, i.e., groups wherein each group represents a particular numberof doublewidths (step 8030). The system may proceed as now described inan example. The system selects the data points from the histogram thathas the largest span (e.g., the odd histogram in FIG. 15). If it isknown that the maximum number of consecutive narrow portions is 13, itis assumed that such data points may represent up to only six clusters.To determine which number between 1 and 6 is the proper number ofclusters, each number is tested, as follows. The span selected (e.g.,span 0 to 65 in FIG. 15) is divided into equal-sized sections accordingto the number under test. For each data point found in each section, thesystem determines a difference dx between the location of the data pointand the center of the section. After the system determines a standarddeviation for dx which represents the extent to which the data pointsare spread out, on average, in each section, the standard deviation isdivided by the section size to produce a score. The number under testthat produces the lowest score is selected by the system as the correctnumber of clusters. The system may similarly test the data points fromthe other histogram to confirm that the correct number was selected.

[0068] The system determines linear relationships (e.g., lines 152 and154 of FIG. 16) that relate the cluster numbers to the distancesrepresented by the data points (step 8040). The doublewidth isdetermined to be equal to the average of the slopes of the linearrelationships (step 8050). The slopes may be calculated by a method ofjoint linear regression with common slope, using least-squares.

[0069] Armed with the determined doublewidth, the system then determinesthe number of narrow portions between dissimilar and similar saturatedportions (step 8060). For each distance between dissimilar saturatedportions, the number is equal to twice the number of doublewidths thatfit in the distance. For each distance between similar saturatedportions, the number is equal to the number of doublewidths that fit inthe distance, plus one.

[0070] Since the saturated portions are explicitly represented in thebrightness curve, the system can determine the positions of thetransitions between all of the bar code symbol's portions by dividing upthe distances between the saturated portions according to the determinednumber of narrow portions between the saturated portions (step 8070).

[0071] In another embodiment, the system operates with the followingdifferences. To determine whether the image is slightly, moderately, orseverely blurred, the system relies on an edge-by-edge peak-valleyanalysis in which each edge is classified in turn by its height relativeto the height of a previously classified adjacent edge. Thus, edges areanalyzed in successive, overlapping pairs. In each pair, the relativeheights are expressed as a ratio of the lesser of the two heights to thegreater of the two heights. To avoid false edges resulting fromhigh-frequency noise, if the ratio is less than a predetermined fraction(e.g., one-quarter), the smaller edge is ignored, i.e., is considered apart of a different, larger edge.

[0072] Each edge is classified into one of three height classes: fortransitions between saturated light and saturated dark (“class 1”),between unsaturated light or dark and saturated dark or light (“class2”), or between unsaturated light and unsaturated dark (“class 3”). Theclass of the previously classified adjacent edge determines the set ofpossible classes for the edge currently being classified. If thepreviously classified adjacent edge belongs to class 1 which requiresthat the portion between the edges in the pair be a saturated portion,the current edge may belong to class 1 or class 2 but not class 3. Wherethe previously classified adjacent edge belongs to class 2 or 3, the setof possible classes includes classes 1-3 or classes 2-3, respectively.

[0073] If the ratio is greater than another predetermined fraction(e.g., three-quarters), the current edge is determined to belong to thesame height class as the previously classified adjacent edge. Otherwise,the current edge is classified into one of the other classes in the setof possible classes, i.e., into class 1 or 3 (the current edgecorresponding to the greater or the lesser, respectively, of the twoheights in the ratio) if the previously classified adjacent edge belongsto class 2, or into class 2 if not.

[0074] After the edges have been classified, the system determines peakand valley points such as points 168 and 170 (FIG. 19) for the wholebrightness waveform. In accordance with the classification of the edges,each of these points corresponds to saturated light, saturated dark,unsaturated light, unsaturated dark, or gray.

[0075] If the image includes points corresponding to gray, the image isdetermined to be severely blurred. Otherwise, the image is determined tobe moderately blurred if points corresponding to unsaturated dark orlight are found, or slightly blurred if not.

[0076] Slightly blurred images are processed as described above. Theprocessing of moderately blurred images differs from the processingdescribed above in that the edges are analyzed in groups, wherein eachgroup is delimited by a saturated peak point and a saturated valleypoint, and the average of the delimiting points serves as the anchorheight level for each edge in the group.

[0077] In the processing of severely blurred images, the distancesbetween the saturated portions are determined not by reference to the25%, 50%, or 75% levels described above but by reference to calculatedreference levels instead. Each calculated reference level is calculatedby taking the average of the corresponding peak or valley point and alocal average gray level derived by averaging all of the peak and valleypoints between the saturated portions.

[0078] The width of a narrow portion (“singlewidth”) is determinedinstead of the doublewidth, by using both odd and even histogram data todetermine a single linear relationship (e.g., line 172 of FIG. 20).Parity between odd and even histogram data is preserved by aligning adata point from the odd histogram data with an odd horizontal point evenif the data point is closer to an even horizontal point.

[0079] In at least some cases that may involve significant noise,undersampling, non-uniform illumination, or a failure to find any edgeof height h1, this other embodiment can determine the positions wherethe first-described embodiment cannot.

[0080]FIG. 21 illustrates an example of a scanner system based on theinvention. The image analysis system 10 and bar code interpretationsystem 26 are implemented by a processor circuit 174 (e.g., a PowerPCprocessor) communicating with control logic 178 (e.g., an ASIC)responsive to a trigger circuit 180 (e.g., a switch) to store in amemory circuit 176 (e.g., a flash memory) the bar code image 12 (e.g., a8-bit 624×480 image) acquired via the image acquisition system 20, andthe set 16 of positions of transitions derived from the bar code image.The data 28 is transmitted to a computer 182 via a serial port 184(e.g., an RS-232 port).

[0081] For the purpose of acquiring the bar code image, the controllogic responds to signals from the processor to activate a framingillumination circuit 186 (e.g., a circuit producing a diffracted laserbeam) to allow the scanning system to be aimed, and an imageillumination circuit 188 (e.g., a circuit including an LED array) toilluminate the bar code symbol 14. In the image acquisition system 20,image data is derived in the CCD imager 24 by an analog-to-digitalconverter circuit 192 from signals produced by a CCD circuit 190 fromlight captured by the lens apparatus (e.g., a passive fixed lens), whichimage data is passed to the control logic to form the bar code image inthe memory.

[0082] The image analysis system, the bar code interpretation system,the image acquisition system, and the framing and image illuminationsystems may be arranged in a single scanner unit 192 that may be ahandheld scanner. Alternatively, the computer may provide at least theprocessor and memory circuits so that the procedures described above areexecuted in the computer according to computer software loaded in thecomputer, with the computer's keyboard or mouse or a sensor deviceserving as the trigger circuit.

[0083] In any case, the techniques (i.e., the procedures describedabove) may be implemented in hardware or software, or a combination ofboth. In at least some cases, it is advantageous if the techniques areimplemented in computer programs executing on programmable computersthat each include a processor, a storage medium readable by theprocessor (including volatile and non-volatile memory and/or storageelements), at least one input device such as a keyboard, and at leastone output device. Program code is applied to data entered using theinput device to perform the procedure described above and to generateoutput information. The output information is applied to one or moreoutput devices.

[0084] In at least some cases, it is advantageous if each program isimplemented in a high level procedural or object-oriented programminglanguage such as ANSI C to communicate with a computer system. Theprograms can be implemented in assembly or machine language, if desired.In any case, the language may be a compiled or interpreted language.

[0085] In at least some cases, it is advantageous if each such computerprogram is stored on a storage medium or device (e.g., ROM or magneticdiskette) that is readable by a general or special purpose programmablecomputer for configuring and operating the computer when the storagemedium or device is read by the computer to perform the proceduresdescribed in this document. The system may also be considered to beimplemented as a computer-readable storage medium, configured with acomputer program, where the storage medium so configured causes acomputer to operate in a specific and predefined manner.

[0086] Other embodiments are within the scope of the following claims.For example, the image analysis system may be applied to a brightnesscurve produced by a laser scanning bar code reader, as shown in FIG. 22.A laser scanning bar code reader is shown in FIG. 23. One or more of theprocedures for processing blurred signals may be used independently,e.g., without a preceding execution of the procedure for determiningwhether the signal is slightly, moderately, or severely blurred.

[0087] The invention applies to all types of signals, including analogsignals representing images. For example, one or more of the proceduresdescribed above may be applied to an analog electrical signal containinginformation representative of reflected light from indicia (e.g., a barcode symbol) including regions of different light reflectivity (e.g.,the dark and light portions described above). An analog scan signal maybe produced that is representative of light sensed from the bar codesymbol, and at least one of the procedures described above may beapplied to the analog scan signal. The analog electrical signal need notliterally be an analog signal; it can be represented by a sampled (andthus digital) signal.

What is claimed is:
 1. A method for use in processing an analogelectrical signal in a laser scanning bar code reader containinginformation representative of reflected light from indicia includingregions of different light reflectivity, wherein the analog electricalsignal contains edge transitions corresponding to boundaries betweenadjoining regions of different light reflectivity of the indicia,comprising the steps of: analyzing the edge transitions of at least apart of the analog electrical signal to determine a level of blur inthat part of the analog electrical signal; and based on the determinedlevel of blur, selecting one of a plurality of different techniques forprocessing that part of the analog electrical signal to produce adigitized electrical signal in which transitions in the digital level ofthe signal correspond to boundaries between adjoining regions ofdifferent light reflectivity of the indicia.
 2. The method of claim 1wherein the step of analyzing the edge transitions is performed on aplurality of different parts of the analog electrical signal anddifferent digitizing techniques are used on the different parts of theanalog signal depending on the level of blur in the different parts ofthe analog signal.
 3. The method of claim 1, further comprising rankingthe edge transitions by magnitude; and analyzing the ranked edgetransitions to detect the extent of blur represented in the part of theanalog electrical signal.
 4. The method of claim 3 wherein the rankingis done by forming a histogram of the magnitudes of the edgetransitions.
 5. The method of claim 3, further comprising if the part ofthe analog electrical signal has edge transitions of substantiallydifferent magnitudes, determining that significant blur is representedin that part of the analog electrical signal.
 6. The method of claim 5,further comprising rejecting edge transitions having less than athreshold magnitude.
 7. The method of claim 5, further comprisinggrouping the edge transitions into sets by magnitude; and testingwhether the difference between a first magnitude associated with a firstset and a second magnitude associated with a second set is substantiallyequal to the difference between the first magnitude and a thirdmagnitude associated with a third set.
 8. A method for use in processingan analog electrical signal in a laser scanning bar code readercontaining information representative of reflected light from indiciaincluding regions of different light reflectivity, wherein the analogelectrical signal contains edge transitions corresponding to boundariesbetween adjoining regions of different light reflectivity of theindicia, comprising the steps of: determining whether an edge transitioncorresponds to a boundary between adjoining regions of substantiallyequal width; and based on the determination, producing a digitizedelectrical signal in which transitions in the digital level of thesignal correspond to the boundaries between adjoining regions ofdifferent light reflectivity of the indicia.
 9. The method of claim 8,further comprising determining whether at least a part of the analogelectrical signal is inconsistent with an alternating dark-and-lightfeature of a bar code symbol.
 10. The method of claim 9, furthercomprising if the inconsistency is found, rejecting at least that partof the analog electrical signal.
 11. The method of claim 8, furthercomprising determining whether a part of the analog electrical signalcrosses a magnitude threshold more than once.
 12. The method of claim11, further comprising if the part is found to cross the magnitudethreshold more than once, rejecting at least the part of the analogelectric signal.
 13. The method of claim 8, further comprisingdetermining the extent to which an edge transition that corresponds to aboundary between two adjoining regions of different widths is affectedby one of the regions.
 14. A method for use in processing an analogelectrical signal in a laser scanning bar code reader containinginformation representative of reflected light from indicia includingregions of different light reflectivity, wherein the analog electricalsignal contains edge transitions corresponding to boundaries betweenadjoining regions of different light reflectivity of the indicia,comprising the steps of: determining that the analog electrical signalcontains edge transitions corresponding to less than all of theboundaries between the adjoining regions of different light reflectivityof the indicia; for at least part of the analog electrical signal,determining the number of boundaries that lack corresponding edges; andbased on the determination about the number of boundaries that lackcorresponding edges, producing a digitized electrical signal in whichtransitions between the digital level of the signal correspond toboundaries between regions of different light reflectivity of theindicia.
 15. The method of claim 14, further comprising determininginformation about the relative positioning of the boundaries that lackcorresponding edge transitions.
 16. The method of claim 14, furthercomprising determining information about the relative positioning of atleast three boundaries that lack corresponding edge transitions.
 17. Themethod of claim 14, further comprising determining information about therelative positioning of boundaries that lack corresponding edgetransitions, between regions of dissimilar light reflectivity of theindicia.
 18. The method of claim 17, wherein the relative positioning isdetermined with respect to intermediate points in the regions.
 19. Themethod of claim 14, further comprising determining information about therelative positioning of boundaries that lack corresponding edgetransitions, between regions of similar light reflectivity of theindicia.
 20. The method of claim 19, wherein the relative positioning isdetermined with respect to intermediate points in the regions.
 21. Amethod for use in processing an analog electrical signal in a laserscanning bar code reader containing information representative ofreflected light from indicia including regions of different lightreflectivity, wherein the analog electrical signal contains edgetransitions corresponding to boundaries between adjoining regions ofdifferent light reflectivity of the indicia, comprising the steps of:determining the relative heights of edge transitions in the analogelectrical signal; and depending on the relative heights, selecting oneof a plurality of different techniques for processing the electricalsignal to produce a digitized electrical signal in which transitions inthe digital level of the signal correspond to boundaries betweenadjoining regions of different light reflectivity of the indicia.
 22. Amethod for use in processing an analog electrical signal in a laserscanning bar code reader containing information representative ofreflected light from indicia including regions of different lightreflectivity, wherein the analog electrical signal contains edgetransitions corresponding to boundaries between adjoining regions ofdifferent light reflectivity of the indicia, comprising the steps of:analyzing the edge transitions to classify at least a part of the analogelectrical signal into one of three categories corresponding to slight,moderate, or severe levels of blur in that part of the analog electricalsignal; if the part of the analog electrical signal is classified intothe category corresponding a slight level of blur or into the categorycorresponding to a moderate level of blur, based on half-height pointsin edge transitions in the analog electrical signal, determininginformation about the relative positions of boundaries between adjoiningregions of different light reflectivity of the indicia; if the part ofthe analog electrical signal is classified into the categorycorresponding a severe level of blur, based on a determination about thenumber of regions disposed between regions about which relativepositioning information is known, determining information about therelative positions of boundaries between adjoining regions of differentlight reflectivity of the indicia; and based on the informationdetermined about the relative positions, producing a digitizedelectrical signal in which transitions between the digital level of thesignal correspond to boundaries between regions of different lightreflectivity of the indicia.
 23. A method of processing an analogelectrical signal in a laser scanning bar code reader containinginformation representative of reflected light from indicia includingregions of different light reflectivity, wherein the electrical signalcontains edge transitions corresponding to boundaries between adjoiningregions of different light reflectivity of the indicia, comprising thesteps of: processing the electrical signal to determine a set ofpossible edge transition points in said signal; classifying at leastsome of the edge transition points against a predetermined amplitude andfrequency threshold into at least two categories corresponding to thefrequency spectrum or blur of the signal associated with each edgetransition point; and separately processing each set of edge transitionpoints in each category as a result of the classifying step, andcombining the result producing a digitized electrical signal in whichtransitions between the digital level of the signal correspond toboundaries between regions of different light reflectivity of theindicia.
 24. A method for use in processing an analog electrical signalin a laser scanning bar code reader containing informationrepresentative of reflected light from indicia including regions ofdifferent light reflectivity, wherein the analog electrical signalcontains edge transitions corresponding to boundaries between adjoiningregions of different light reflectivity of the indicia, comprising thesteps of: detecting edge transitions in the analog scan signal;determining the level of blur in the vicinity of each of a plurality ofedge transitions; digitizing the edge transitions differently based onthe determined level of blur in the vicinity of the edge transition;combining the results of the digitizing step to produce a digitizedelectrical signal from the analog scan signal.